Skip to main content

Sugar - Buzzer Module

Introduction

2 Active Buzzers

Function


Play sound, ticking sound

Signal:Timing Signal

How the Module Works

An active buzzer is an acoustic module that combines a vibrating diaphragm, driver circuits, and sound source components. It can produce clear, stable sound signals. Compared with passive buzzers, active buzzers feature a small size, high volume, and good sound quality. They are widely used in alarms, prompts, and reminders.

  • Oscillator: An active buzzer has a built-in oscillator that can generate high-frequency electrical signals. This oscillator usually consists of a transistor, a capacitor, and a resistor and can oscillate at a specific frequency.
  • Driver circuit: When an external input signal reaches the active buzzer, it is transmitted to the built-in driver circuit. The driver circuit controls the frequency and amplitude of the oscillator according to the input signal and converts it into an acoustic signal.
  • Sound output: When the oscillator starts to oscillate and the driver circuit starts to work, the active buzzer emits sound. The loudness and frequency of the sound depend on the characteristics of the input signal and the parameters of the built-in oscillator and driver circuit.

Wiring

未标题-2.png

Future Board Lite InterfaceWire
2有源蜂鸣器.pngSugar Cube - Buzzer ModulePort3White PH2.0-3Pin Interface Cableuntitled.100.png

warning: Supports being connected to Port1, Port2, Port3, Port4 Make sure the interface and the actual one are consistent when programming

Block - Function Description

NumberBlock DiagramBlock Function
1blocksPng-1710401953192Control the buzzer switch

Program 1 - The complete program

image-20240314160624844

Program 1 - Feature Description

By controlling the opening and closing, the frequency of the sound can be controlled to achieve different sound effects.

Using Kittenblock

Run the program offline to see the result

Using Microbit

Robotbit_压缩后.png

Programming Platform

Microsoft MakeCode for micro:bit Using Makecode programming platform

Add Sugar plug-in

image-20240311154521941 image.png Search for Sugar in the extension, click Add

Circuit Connection

image.png

Microbit interfacewire
2有源蜂鸣器.pngSquare BuzzerP0White PH2.0-3Pin Female to Female Jumper Wireuntitled.100.png

Block - Function Description

NumberBlock DiagramBlock Function
1image-20240314160802472Control the buzzer switch

Case: Button Control

image-20240314160909307

image-20240314160917689